package com.youlu.campus.entity.VO.res;

import com.youlu.campus.entity.ActivityQuestionInfo;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections4.CollectionUtils;

import java.util.List;

@Setter
@Getter
public class QaInfoScoreResponse {

    private Double qaScore = 0D;

    /**
     * 答题错误
     */
    private Integer qaErrorCount = 0;
    /**
     * 答题正确数量
     */
    private Integer qaRightCount = 0;

    /**
     * 错误答题集合
     */
    private List<ActivityQuestionInfo> userAnswersErrorQuestionInfoList;

    /**
     * 正确答题集合
     */
    private List<ActivityQuestionInfo> userAnswersRightQuestionInfoList;


    public void clear() {
        if (CollectionUtils.isNotEmpty(userAnswersErrorQuestionInfoList)) {
            userAnswersErrorQuestionInfoList.clear();
        }
        if (CollectionUtils.isNotEmpty(userAnswersRightQuestionInfoList)) {
            userAnswersRightQuestionInfoList.clear();
        }
    }


}
